/**
 * 网络相关
 * Created by duwei on 2018/4/18.
 */
var NetManager = {};
/**
 * 是否是联网
 * @return {Boolean}
 */
NetManager.isWAN = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        return jsb.reflection.callStaticMethod("NetManager", "isWAN");
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        return jsb.reflection.callStaticMethod(packageUri + "/utils/NetManager", "isWAN", "()Z");
    }
    return false;
};
/**
 * 是否是WIFI
 * @return {Boolean}
 */
NetManager.isWifi = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        return jsb.reflection.callStaticMethod("NetManager", "isWifi");
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        return jsb.reflection.callStaticMethod(packageUri + "/utils/NetManager", "isWifi", "()Z");
    }
    return true;
};
/**
 * 是否联网状态
 * @returns {Boolean}
 */
NetManager.isNetWork = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        return jsb.reflection.callStaticMethod('NetManager', 'isNetwork');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        return jsb.reflection.callStaticMethod(packageUri + '/utils/NetManager', 'isNetwork', '()Z');
    }
    return true;
};